package com.projectsquirrel;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.TabWidget;


public class infoMenu extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.observationform);
	    
	    final FrameLayout layout1 = (FrameLayout) findViewById(R.id.frameLayout1);
	    final FrameLayout layout2 = (FrameLayout) findViewById(R.id.frameLayout2);
	    final FrameLayout layout3 = (FrameLayout) findViewById(R.id.frameLayout3);
	    final FrameLayout layout4 = (FrameLayout) findViewById(R.id.confirmationLayout);
	    final Button nextObsButton2 = (Button) findViewById(R.id.nextObsScreen2);
	    final Button nextObsButton3 = (Button) findViewById(R.id.nextObsScreen3);
	    final Button ObsSubmitButton = (Button) findViewById(R.id.ObsSubmit);
	    final Button backObsButton1 = (Button) findViewById(R.id.backObsScreen1);
	    final Button backObsButton2 = (Button) findViewById(R.id.backObsScreen2);
	    final Button tabButton1 = (Button) findViewById(R.id.tabButton);
	    nextObsButton2.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				layout1.setVisibility(View.GONE);
				layout2.setVisibility(View.VISIBLE);
				layout3.setVisibility(View.GONE);
				nextObsButton2.setVisibility(View.GONE);
				nextObsButton3.setVisibility(View.VISIBLE);
				backObsButton1.setVisibility(View.VISIBLE);
				backObsButton2.setVisibility(View.GONE);
				tabButton1.setVisibility(View.GONE);
				//View.VISIBLE
			}
			
	    });
	    backObsButton1.setOnClickListener(new OnClickListener() {
	    	@Override
	    	public void onClick(View v) {
	    		layout1.setVisibility(View.VISIBLE);
	    		layout2.setVisibility(View.GONE);
	    		layout3.setVisibility(View.GONE);
	    		backObsButton1.setVisibility(View.GONE);
				nextObsButton2.setVisibility(View.VISIBLE);
				nextObsButton3.setVisibility(View.GONE);
				ObsSubmitButton.setVisibility(View.GONE);
				tabButton1.setVisibility(View.INVISIBLE);
				//View.VISIBLE
			}
	    });
	    nextObsButton3.setOnClickListener(new OnClickListener() {
	    	@Override
	    	public void onClick(View v) {
	    		layout1.setVisibility(View.GONE);
				layout2.setVisibility(View.GONE);
				layout3.setVisibility(View.VISIBLE);
				backObsButton1.setVisibility(View.GONE);
				backObsButton2.setVisibility(View.VISIBLE);
				nextObsButton3.setVisibility(View.GONE);
				ObsSubmitButton.setVisibility(View.VISIBLE);
				//View.VISIBLE
			}
	    });
	    backObsButton2.setOnClickListener(new OnClickListener() {
	    	@Override
	    	public void onClick(View v) {
	    		layout1.setVisibility(View.GONE);
	    		layout2.setVisibility(View.VISIBLE);
	    		layout3.setVisibility(View.GONE);
	    		backObsButton1.setVisibility(View.VISIBLE);
	    		backObsButton2.setVisibility(View.GONE);
				nextObsButton2.setVisibility(View.GONE);
				nextObsButton3.setVisibility(View.VISIBLE);		
				ObsSubmitButton.setVisibility(View.GONE);
				//View.VISIBLE
			}
	    });
	    ObsSubmitButton.setOnClickListener(new OnClickListener() {
	    	@Override
	    	public void onClick(View v) {
	    		layout1.setVisibility(View.GONE);
	    		layout2.setVisibility(View.GONE);
	    		layout3.setVisibility(View.GONE);
	    		layout4.setVisibility(View.VISIBLE);
	    		backObsButton1.setVisibility(View.GONE);
	    		backObsButton2.setVisibility(View.GONE);
				nextObsButton2.setVisibility(View.GONE);
				nextObsButton3.setVisibility(View.GONE);
				ObsSubmitButton.setVisibility(View.GONE);
				//View.VISIBLE
			}
	    });
	}
}